home *** CD-ROM | disk | FTP | other *** search
/ Popular Request / By Popular Request (Arsenal Computer)(SysOptics Distribution System).ISO / amiga2 / jad30amy.lha / jade / lisp / info.jlc < prev    next >
Text File  |  1994-04-20  |  6KB  |  45 lines

  1.  
  2. (provide (quote info))
  3.  
  4. (defvar info-directory (if (amiga-p) "INFO:" "/usr/local/info/") 58025)
  5.  
  6. (unless (boundp (quote info-initialised)) (put (quote info-error) (quote error-message) "Info") (setq info-keymap (make-keytab) info-buffer (make-buffer "*Info*") info-tags-buffer (make-buffer "*Info tags*") info-history nil info-file-name nil info-node-name nil info-file-modtime nil info-indirect-list nil info-initialised t) (bind-keys info-keymap "space" (quote next-screen) "backspace" (quote prev-screen) "1" (quote (info-menu-nth 1)) "2" (quote (info-menu-nth 2)) "3" (quote (info-menu-nth 3)) "4" (quote (info-menu-nth 4)) "5" (quote (info-menu-nth 5)) "b" (quote goto-file-start) "f" (quote info-follow-ref) "g" (quote info-goto-node) "l" (quote info-last) "m" (quote info-menu) "n" (quote info-next) "p" (quote info-prev) "q" (quote info-quit) "u" (quote info-up)) (set-buffer-special info-buffer t) (set-buffer-special info-tags-buffer t) (with-buffer info-buffer (setq keymap-path (cons info-keymap keymap-path)) (set-buffer-read-only info-buffer t)))
  7.  
  8. (defun info-read-tags (filename) (lisp-code "D\n\tI456åå ÇÖçê*}Hë▒èHIF&ïHîåìJ F$H■Ç╝ÄÅJ ■üëÉå\tF$■Ç╨æÆ\n]■Ç⌡ôöòû \tùöÿû \nKïKF&ïH√Ç┐HÖï\tF&ïHîåÜJ F$H■üòÄ¢J ⁿüá£å\t√üÑç¥}H&₧ƒ\tF&áHJG▒HE" [open filename "r" path-name str dir file info-error "Can't open info file" info-tags-buffer clear-buffer info-indirect-list read-file-until "^(Tag Table:|Indirect:) *\n$" regexp-match "Indirect" read-line string-head-eq "" read-from-string regexp-expand "^.*: ([0-9]+)\n$" "\\1" concat "^(.*): [0-9]+\n$" nreverse "^Tag Table: *\n$" "Tag Table" read-buffer ("No tag table in info file") info-file-name file-modtime info-file-modtime] 8))
  9.  
  10. (defun info-remember nil (lisp-code "■Çà■Çæ+KF#" [info-file-name info-node-name cursor-pos info-history] 3))
  11.  
  12. (defun info-find-node (nodename) (lisp-code "D I45ⁿüûå\t Ç∞åçê\n\tⁿǽçê\nF%√Ç∞åçë\n\tⁿÇ┬çë\nF%√Ç∞åçëê \tⁿÇ▌çëê F%√Ç∞JⁿÇδèï*}√Ç∞IHî`] Çⁿì\tÄd■üâÅ\tHÉ F\" üôæF\"√ü½î■üúìî\tÄd■ü½Åî\tHî ü╗ÅçëÆ\n\tHDçôö II6ò6û6ùÿùÖÜÜ\n¢J ⁿé∙£¢¥K\tF$H₧lⁿü²ƒV$îF&û√é½áísHû₧LaⁿéòƒVF$√éñûLX₧LLVƒVF$HûMF&ûHóûú F&òⁿé∩ñÑI\nHªHºò\tHñÑJ\nH¿HF&⌐H笽î\t¼⌐ F&¡√é÷è«*}√âÇè»*}EE" [regexp-expand "^\\((.*)\\).*$" nodename "\\1" offset filename file-exists-p concat ".info" info-directory info-error "Can't find file" info-file-name file-modtime info-file-modtime info-read-tags "^\\(.*\\)(.+)$" "Top" "dir" "^Node: " 127 text subfile regexp find-next-regexp pos 1 info-tags-buffer read find-last-end-pos info-indirect-list 2 (lisp-code "D1M■ÇóMLLf■ÇÖLF#HItHMF!H√ÇâHLF#E" [info-indirect-list list offset subfile info] 2) (quote info) read-file-from-to 31 set-buffer-read-only info-buffer clear-buffer insert goto-file-start info-node-name 40 base-name 41 mode-name "Can't read from file" "Can't find node"] 5))
  13.  
  14. (defun info-list-nodes (start) (lisp-code "D I45å▒çHêIIJ ■Ç▒ëè\tHïîIIJKF$H√ÇÉG▒HHE" [concat "^Node: (" start ".*)" list regexp info-tags-buffer goto-file-start find-next-regexp goto find-last-end-pos regexp-expand-line "\\1"] 7))
  15.  
  16. (defun info-prompt (list-fun &optional title default start) (lisp-code " ÇçF H■Çö F Hå ÇƒçF&åHDII6ê6ëèïå F&ëHëç`ⁿÇ┐√Ç┴ëE" [title "Select node" default concat " (default: " ")" start "" prompt-list res prompt2 (lambda (w) (lisp-code " ÇÄ▒\tF G▒HH\t" [prompt-list info-buffer funcall list-fun prompt-complete-from-list w] 3))] 5))
  17.  
  18. (defun info (&optional start-node) 58090 (lisp-code "H\tHⁿÇæ\t√Ǫ■Çùå ÇªJⁿÇÑç\t√ǪI" [info-remember goto-buffer info-buffer start-node info-find-node info-file-name info-node-name "(dir)"] 2))
  19.  
  20. (defun info-goto-node nil (lisp-code "D\t2■ÇÅH\tE" [prompt "Goto node: " node info-remember info-find-node] 2))
  21.  
  22. (defun info-parse-menu-line nil (lisp-code "\n ÇÆ\n ÇÆ\n" [regexp-expand-line "^\\* ([a-zA-Z0-9]+.*)::" "\\1" "^\\* [a-zA-Z0-9]+.*: *(\\(.*\\).*)\\." "^\\* [a-zA-Z0-9]+.*: *(.*)\\."] 3))
  23.  
  24. (defun info-list-menu-items nil (lisp-code "DI12\t■Çáå\tHçêë\nKF\"H√ÇåHE" [cursor-pos opos list find-next-regexp "^\\* [a-zA-Z0-9]+.*:" goto find-last-end-pos regexp-expand-line "^\\* ([^:.]+)" "\\1"] 3))
  25.  
  26. (defun info-goto-menu-start nil (lisp-code "IIJ  ÇÅIIJ ■ÇÖå\n\t" [find-prev-regexp "^\\* Menu: *$" find-next-regexp goto next-line 1 find-last-start-pos] 5))
  27.  
  28. (defun info-menu-nth (item-index) (lisp-code " Çë)}Hd■Çöå\t■ÇÑçê\tHiF#H√ÇèHc■Ç▒ë)}HèHDï6îîⁿÇ═ìHÄî\t√Ç╥Å)}E" [info-goto-menu-start info-error "Can't find menu" item-index 0 find-next-regexp "^\\* .*:" goto find-last-end-pos "Can't find menu node" goto-line-start info-parse-menu-line nodename info-remember info-find-node "Menu line malformed"] 2))
  29.  
  30. (defun info-menu nil (lisp-code "D\n3■ÇíD6åçêë F#Hèå\tEH■ÇΓïîìÄ \tⁿÇ█èÅ\tHDÉ6ææⁿÇ╤ÆHôæ\t√Ç╫öò)}E√ÇΓöû*}E" [regexp-expand-line "^\\* ([^:.]+)" "\\1" menu-name info-goto-menu-start cursor-pos opos info-prompt info-list-menu-items "Menu item" goto find-next-regexp concat "^\\* " 58 find-last-start-pos info-parse-menu-line node-name info-remember info-find-node info-error "Menu line malformed" "Can't find menu"] 5))
  31.  
  32. (defun info-follow-ref nil (lisp-code "I" [] 1))
  33.  
  34. (defun info-last nil (lisp-code "ⁿÇ⌐DL1MF HLåP \t■ÇÑçêP\tHJE√Ç▓ëè\tHï" [info-history hist info-find-node concat 40 41 1 goto 2 title "No more history" beep] 7))
  35.  
  36. (defun info-next nil (lisp-code "\t" [info-find-link "Next"] 2))
  37.  
  38. (defun info-prev nil (lisp-code "\t" [info-find-link "Prev"] 2))
  39.  
  40. (defun info-up nil (lisp-code "\t" [info-find-link "Up"] 2))
  41.  
  42. (defun info-find-link (link-type) (lisp-code "D\n3åçç\nIJ6êêⁿǪëHèê\t√Ç┤ïîì \tHÄE" [concat link-type ": ([^,]*)(,| *$)" regexp regexp-expand-line "\\1" pos 1 new-node info-remember info-find-node title "No " " node" beep] 6))
  43.  
  44. (defun info-quit nil (lisp-code "\t" [kill-buffer info-buffer] 2))
  45.